# 使用CUDA 11.6的基础镜像
FROM swr.cn-south-1.myhuaweicloud.com/mindspore/mindspore-gpu:runtime

# 下载并安装Miniconda
RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh && \
    bash miniconda.sh -b -p $HOME/miniconda && \
    rm miniconda.sh && \
    ~/miniconda/bin/conda init

# 创建Python 3.9环境并安装MindSpore和其他依赖
RUN ~/miniconda/bin/conda create -n py39 python=3.9 -y && \
    ~/miniconda/bin/conda run -n py39 conda install mindspore=2.2.14 -c mindspore -c conda-forge -y

# 设置环境变量以使用conda环境
ENV PATH="/root/miniconda/envs/py39/bin:$PATH"

